package com.hanhai.material.device.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.RelationOneToMany;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  实体类。
 *
 * @author youchuang
 * @since 2024/08/26 15:21:53
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_stock",dataSource = "device")
public class SysStock implements Serializable {

    @Id
    private Integer id;

    private String code;

    private String name;

    private Boolean isStock;

    private Integer parentId;
    @RelationOneToMany(selfField = "id",targetField = "parentId")
    private List<SysStock> children;

}
